package com.carleasoft.mps.adu.business.dept.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.carleasoft.mps.adu.business.dept.bean.entity.DeptEntity;
import com.carleasoft.mps.adu.business.dept.bean.po.DeptPagePo;
import com.carleasoft.mps.adu.business.dept.bean.po.DeptPo;
import com.carleasoft.mps.adu.business.dept.bean.vo.DeptDetailVo;
import com.carleasoft.mps.adu.business.dept.bean.vo.DeptTreeVo;
import com.carleasoft.mps.core.user.SortPo;

import java.util.List;

/**
 * <p>Description: dept service </p>
 *
 * @author ztm
 * @since 2020/4/29
 */
public interface DeptService extends IService<DeptEntity> {


    /**
     * 添加部门或机构
     *
     * @param deptPo
     * @return 部门编码
     */
    DeptEntity add(DeptPo deptPo);

    /**
     * 删除部门或机构
     *
     * @param deptCode
     */
    Boolean deleteDept(String deptCode);

    /**
     * 更新部门或机构信息
     *
     * @param deptUpdatePo
     */
    DeptEntity updateDept(DeptPo deptUpdatePo);

    /**
     * 查询部门或机构信息
     *
     * @param deptUpdatePo
     * @return
     */
    DeptDetailVo findByDeptCode(DeptPo deptUpdatePo);

    /**
     * 查询数据
     * @param deptPagePo
     * @return
     */
    List<DeptTreeVo> treePageDept(DeptPagePo deptPagePo);


    Boolean updateSort(SortPo sortPo);

    List<DeptEntity> getByDeptList(DeptPagePo deptPagePo);

    DeptEntity getByDeptCode(String code);

    public List<DeptEntity> getDeptAll();
    /**
     * 不带入权限查部门树
     */
    List<DeptTreeVo> deptTree();

    List<DeptEntity> deptChildTree(DeptTreeVo deptTreeVo);
}
